<?php
/**
 * 物流公司
 * (rakuten-model)
 */
namespace App\Models\Rakuten;

use Illuminate\Database\Eloquent\Model;

class RakutenCompany extends Model{

    protected $connection = 'mysql_rakuten';

    protected $table = 'rakuten_company';

    protected $guarded  = [];

    /**
     * 日文
     * @param array $where
     * @param string $column1
     * @param string $column2
     * @return \Illuminate\Support\Collection
     */
    public static function options($where = []){
        $query = $where ? self::query()->where(formatCondition($where)) : self::query();
        return $query->pluck('company_name', 'company');
    }

    /**
     * 中文
     * @param array $where
     * @return \Illuminate\Support\Collection
     */
    //public static function optionsCn($where = []){
    //    $query = $where ? self::query()->where(formatCondition($where)) : self::query();
    //    return $query->pluck('company_name_cn', 'company');
    //}

}
